<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
 
 
<s:form id="add_pubOffice_form" name="add_pubOffice_form" method="post" action="pubOffice/save.do" enctype="multipart/form-data" onsubmit="return false;">
	<table class="form-table">
		<tr>
			<th width="150">标题：</th>
			<td>
			<s:textfield key="name" title="请输入名称标题" cssClass="form-txtinput" id="name" size="50" maxlength="100" value="%{model.name}"/>
			</td>
		</tr>
		<tr>
			<th width="150">类别：</th>
			<td>
			<mytag:select id="lb" title="请输入类别" name="lb" sql="basedata" isSql="false" condition="1" dataType="Long" listKey="id" listValue="name" headerKey="" headerValue="请选择" onChange="Ext.milan.pagejs.page_pubOffice.changeJl(this)"/>
			</td>
		</tr>
		<tr>
			<th width="150">子类别：</th>
			<td>
			<select  title="请输入类别" id="lb2" name="lb2" checkEmpty="true" checkDesc="类别"></select>
			</td>
		</tr>
		<tr>
			<th width="150">发布部门：</th>
			<td>
			<mytag:select id="fbbm" title="请输入发布部门" name="fbbm" sql="depttopdata" isSql="false" listKey="deptname" listValue="deptname" headerKey="" headerValue="请选择"/>
			</td>
		</tr>
		<tr>
			<th>查看人员：</th>
			<td>
				<table border="0" cellspacing="1" cellpadding="1">
					<tr>
						<td valign="top" style="border: 0">
							<select id="selected_users_in_poa" name="userids" multiple="true" size="10" style="width: 130px;">
									
							</select>
						</td>
						<td valign="top" style="border: 0">
							<div>
							<a class="btn_long" title="点击添加用户" href="javascript:void(0)" 
								onClick="Ext.milan.pagejs.page_pubOffice.selectUsers('selected_users_in_poa')">添加人员</a>
							<a class="btn_short" title="点击添加用户" href="javascript:void(0)" id="del_user_in_poa_btn" class="btn-short" style="display: none" 
								onClick="Ext.milan.pagejs.page_pubOffice.removeUser()">移除</a>
							</div>
							
							<div style="padding-top: 5px;">
							<a class="btn_long" title="点击添加组用户" href="javascript:void(0)" 
								onClick="Ext.milan.pagejs.page_pubOffice.selectGroupUsers('selected_users_in_poa')">添加组员</a>
							<a class="btn_short" title="点击删除组用户" href="javascript:void(0)" id="del_user_in_pg_btn" class="btn-short" style="display: none" 
								onClick="Ext.milan.pagejs.page_pubOffice.removeGroupUser()">移除</a>
							</div>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<th width="150">备注：</th>
			<td>
			<s:textarea cssClass="framingtable2" name="memo" cols="30" rows="3" id="memo" maxlength="300" style="behavior: url('js/maxlength.htc');height:60px;"></s:textarea>
			</td>
		</tr>
		<tr>
			<th width="150">附件：</th>
			<td>
			<%--<input name="attachFile" type="file" contenteditable="false" id="attachfile" size="40">&nbsp;附件最大不能超过20.00M--%>
			<div><a title="点击选择附件，单个文件大小不超过20.00MB" class="btn_long" id="attachFile_FileUpload" ></a></div>
			<div id='attachFiles'></div>
			</td>
		</tr>
	</table>
	<div class="win-btn-panel">
	    <a class="btn_short" class="btn_short" href="javascript:void(0)" 
			onclick="Ext.milan.pagejs.page_pubOffice.save('add_pubOffice_form')">确 定</a>
		<a class="btn_short" class="btn_short" href="javascript:void(0)" 
			onclick="Ext.milan.pagejs.page_pubOffice.closeWin(false);">取 消</a>
	</div>
</s:form>
<script>
new Milan.widget.FileComponent(
{
	container : "attachFile_FileUpload",
	targetCnt : "attachFiles",
	fileMaxCount : 99,
	onSelectedCallback : function(fid)
	{
		Ext.milan.pagejs.page_pubOffice.addAttachment("attachFiles",fid);
	}
});
</script>
